package com.probiz.estore.exports.service.impl;

import java.util.ArrayList;
import java.util.List;

import com.probiz.estore.exports.service.SalesOrderExportManager;
import com.probiz.estore.order.service.SalesOrderManager;

public class SalesOrderExportManagerImpl extends BaseExportManagerImpl implements SalesOrderExportManager {
	private SalesOrderManager salesOrderManager;
	
	public void setSalesOrderManager(SalesOrderManager salesOrderManager) {
		this.salesOrderManager = salesOrderManager;
	}

	@Override
	public List<Object> getDataSource(String[] ids) {
		List list = new ArrayList();
		if(ids != null && ids.length>0){
			for (String id : ids) {
				Object o = this.salesOrderManager.loadById(Integer.valueOf(id));
				list.add(o);
			}
		} else {
			list = this.salesOrderManager.listAll();
		}
		return list;
	}
}
